package fm.dongman.modellib.model;

import android.os.Parcel;
import android.os.Parcelable;

import fm.dongman.animefm.contractlib.IModel;

/**
 * 轮播
 * Created by Admin on 2017/9/27.
 */

public class BannerModel implements IModel.IBannerModel {

    //图片地址
    private String imageUrl;

    //动漫 id
    private String subjectId;

    //标题
    private String title;

    //文章 id
    private String articleId;

    public BannerModel()
    {

    }

    public BannerModel(String imageUrl,String subjectId,String title,String articleId)
    {
        this.imageUrl = imageUrl;
        this.subjectId = subjectId;
        this.title = title;
        this.articleId = articleId;
    }


    public String getArticleId() {
        return articleId;
    }

    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }

    public String getImgUrl() {
        return imageUrl;
    }

    public void setImgUrl(String imgUrl) {
        imageUrl = imgUrl;
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(imageUrl);
        dest.writeString(subjectId);
        dest.writeString(title);
        dest.writeString(articleId);
    }

    public static Parcelable.Creator<BannerModel> CREATOR=new Creator<BannerModel>() {
        @Override
        public BannerModel createFromParcel(Parcel source) {
            BannerModel model=new BannerModel();
            model.setImgUrl(source.readString());
            model.setSubjectId(source.readString());
            model.setTitle(source.readString());
            model.setArticleId(source.readString());
            return model;
        }

        @Override
        public BannerModel[] newArray(int size) {
            return new BannerModel[size];
        }
    };
}
